<?php
include("../include/config.inc.php");
include("userlogincheck.php");

$orderNo=$_REQUEST["orderNo"];

if(!CheckId($orderNo))
{
	PhpBox("参数错误");
	GotoPage("h");
	exit();
}
$sql="SELECT * FROM ".tableprefix."order where orderNo='$orderNo'";
$result=$db->query($sql);
$row=$db->fetch_array($result);
$paystate=$row["paystate"];
if($paystate==0){
$temp_paystate="待支付";
}else{
$temp_paystate="已完成";
}
$uid=$row["userid"];
$member_name=GetValueByKey(tableprefix."member","member_id",$uid,"member_name");
$goods_id=$row["goods_id"];
$sql="SELECT * FROM ".tableprefix."goods where goods_id='$goods_id'";
$res=$db->query($sql);
$rs=$db->fetch_array($res);
$goods_name=$rs["goods_name"];
$goods_image=$rs["goods_image"];
$goods_price=$rs["goods_price"];
$book_down_payment=$rs["book_down_payment"];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>收支详细 - 订戏会</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=9,Chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="../css/public.css">
<link rel="stylesheet" type="text/css" href="../css/user.css">
</head>
<body>
<div class="paydetails">
	<div class="paybox">
		<h3>订单状态：已完成</h3>
	</div>
</div>
<div class="paydetails">
	<div class="goodsbox">
		<img src="<?php echo $goods_image;?>">
		<div class="goodstext">
			<h2><?php echo $goods_name;?></h2>
			<span>金额：<?php echo $goods_price;?>/场</span>
			<span>订金：<?php echo $book_down_payment;?>/场</span>
		</div>
	</div>
	<div class="goodsprice"><span>金额</span><p>￥<?php echo $row["amount"];?></p></div>
	<div class="goodsprice" style="padding-bottom:10px;"><span>运费</span><p>￥0.00</p></div>
	<div class="goodsamount"><span>实际收入</span><p>￥<?php echo $row["amount"];?></p></div>
</div>
<div class="paydetails">
	<div class="paymain">
		<div>
	订单编号：<?php echo $row["orderNo"];?><br>
	订单类型：提保交易<br>
	下单帐号：<?php echo $member_name;?><br>
	下单时间：<?php echo $row["createtime"];?><br>
	付款时间：<?php echo $row["time_end"];?><br>
	发货时间：<?php echo $row["time_end"];?><br>
	完成时间：<?php echo $row["time_end"];?><br>
	订单来源：订戏会微信公众平台<br>
	支付方式：微信支付
		</div>
	</div>
</div>
<div class="paybtn"><a href="mywallet.php"><div class="paybox">返回</div></a></div>
</body>
</html>